package com.example.jizhang.demos.pojo;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * @TableName t_account
 */
@Data
public class Account implements Serializable {
    private Integer accountId;

    private Double accountSum;

    private Date accountTime;

    private String accountName;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Account other = (Account) that;
        return (this.getAccountId() == null ? other.getAccountId() == null : this.getAccountId().equals(other.getAccountId()))
            && (this.getAccountSum() == null ? other.getAccountSum() == null : this.getAccountSum().equals(other.getAccountSum()))
            && (this.getAccountTime() == null ? other.getAccountTime() == null : this.getAccountTime().equals(other.getAccountTime()))
            && (this.getAccountName() == null ? other.getAccountName() == null : this.getAccountName().equals(other.getAccountName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAccountId() == null) ? 0 : getAccountId().hashCode());
        result = prime * result + ((getAccountSum() == null) ? 0 : getAccountSum().hashCode());
        result = prime * result + ((getAccountTime() == null) ? 0 : getAccountTime().hashCode());
        result = prime * result + ((getAccountName() == null) ? 0 : getAccountName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", accountId=").append(accountId);
        sb.append(", accountSum=").append(accountSum);
        sb.append(", accountTime=").append(accountTime);
        sb.append(", accountName=").append(accountName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}